@extends('adminlte::page')

@section('title', '添加轮播图')

@section('content_header')
    {{--<h1></h1>--}}
@stop

    <style>
        #holder{
            text-align: center;
        }
    </style>

@section('content')
    <form action="{{ route('carousel.store') }}" method="post" id="add">
    <div class="input-group">
       <span class="input-group-btn">
         <a id="lfm" data-input="thumbnail" data-preview="holder" class="btn btn-primary">
           <i class="fa fa-picture-o"></i> 选择轮播图
         </a>
       </span>
            {{ csrf_field() }}
            <input id="thumbnail" class="form-control" type="text" name="path" required>
    </div>
        <input type="text" class="form-control" id="exampleInputEmail1" name="sort" placeholder="填写排序" style="margin-top: 5px !important;" required>
        <img id="holder" style="margin-top:15px;max-height:300px;">

    <a href="{{ route('carousel.add') }}" form="add">
        <button type="submit" class="btn btn-block btn-primary mt-5" style="margin-top: 5px !important;">
            提交
        </button>
    </a>
    </form>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script src="/vendor/laravel-filemanager/js/lfm.js"></script>

    <script>
        $('#lfm').filemanager('image');
    </script>
@stop